import { makeAutoObservable } from "mobx"
import {IPro,ITrade,IProListItem} from '@/utils/interface'
import {getMajorList,getTradeList} from '@/services'

class Managemen {
  constructor(){
    makeAutoObservable(this)
  }
  //专业列表
  majorList:IPro[] = []
  //行业列表
  tradeList:ITrade[] = []

  //获取专业列表
  async getMajorList(){
    let {data} = await getMajorList()
    console.log(data)
    if(data){
      this.majorList = data
    }
  }
  //获取行业列表
  async getTradeList(){
    let {data} = await getTradeList()
    if(data){
      this.tradeList = data
    }
  }
}

export default new Managemen